package com.hxd.mall.module.school.video

import android.widget.ImageView
import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.hxd.mall.R
import com.hxd.mall.module.school.bean.ItemResource
import com.hxd.mall.utils.open.load

/**
 * @author zhaoyong
 * @description:
 * @date :2019-10-15 18:02
 */
class VideoAllListAdapter :
    BaseQuickAdapter<ItemResource, BaseViewHolder>(R.layout.adapter_video_all_list_item_layout) {
    override fun convert(helper: BaseViewHolder?, item: ItemResource?) {
        helper?.run {
            getView<ImageView>(R.id.iv_pic).load(item?.pictUri, R.drawable.banner_default_icon, R.drawable.banner_default_icon)
            getView<TextView>(R.id.tv_title).text = item?.title ?: ""
        }
    }
}